// jBox-container-h5 jBox-mask jBox-message jBox-white jBox-shadow 
@black: #000;
@white: #fff;
@font: #333;
@line: #EBEBEB;
@link: #4A90E2;
@btn: #D8B383;
@bd: #DFE4EA;
@confirm: #25497D;
@cancel: #666;
@close: #999;
@err: #f56c6c;
@fontFamily: "宋体",
  arial,
  helvetica,
  sans-serif;
//H5
@h5-fs-base: 12px;
@h5-fs-t: @h5-fs-base+4;
@h5-fs-m: @h5-fs-base+2;
//pc
@pc-fs-base: 16px;
@pc-fs-t: @pc-fs-base+4;
@pc-fs-m: @pc-fs-base+2;
//尺寸
@btn-h5-h: 46px;

// 样式主体
.jBox-container {
  position: relative;
  z-index: 9999;

  &.jBox-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  &.jBox-fullscreen {
    &.jBox-message.jBox-black {
      .jBox-layout {
        background: transparent;
        color: @white;
      }
    }

    .jBox-layout .__content__ .__content_box__ .__cutdown__ {
      font-size: 150px;
    }
  }

  &.jBox-transparent {
    background: transparent;
  }

  &.jBox-black {
    background: rgba(0, 0, 0, 0.5);

    &.jBox-message {
      .jBox-layout {
        background: @white;
        color: @font;
      }
    }
  }

  &.jBox-white {
    background: rgba(255, 255, 255, 0.5);
  }
}

.jBox-layout {
  position: fixed;
  z-index: 100;

  .__content__ {
    position: relative;
    display: block;
    width: 100%;

    label,
    img {
      display: block;
    }

    .__content_box__ {
      display: flex;
      height: 100%;
      color: @cancel;

      .__content_text__ {
        font-size: @h5-fs-m;

        &.__none__ {
          margin-top: 0 !important;
          margin-left: 0 !important;
        }
      }

      .__cutdown__ {
        font-size: 40px; // font-weight: 700;
        font-family: @fontFamily;
        color: #f3c176;
        padding: 0 20px;
      }

      /***居中***/
      &.__center__ {
        align-items: center;
        justify-content: center;

        .__content_text__ {
          text-align: center;
        }
      }

      /***纵向***/
      &.__ver__ {
        flex-direction: column;
        justify-content: center;

        .__content_text__ {
          margin-top: 8px;
        }

        .__icon__ {
          img {
            width: 32px;
            height: 32px;
          }
        }
      }

      /***横向***/
      &.__hor__ {
        flex-direction: row;
        align-items: center;

        .__content_text__ {
          text-align: left;
          margin-left: 8px;
        }

        .__icon__ {
          img {
            width: 24px;
            height: 24px;
          }
        }
      }
    }
  }

  .__button__ {
    .__button_row__1 {
      a {
        width: 100%;
      }
    }

    .__button_row__2 {
      a {
        width: 50%;
      }
    }

    .__button_row__3 {
      a {
        width: 33.33%;
      }
    }

    .__button_row__4 {
      a {
        width: 25%;
      }
    }
  }
}

/***************提示框***************/

.jBox-message {
  .jBox-layout {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    color: @white;
    font-size: @h5-fs-base;

    .__content__ {
      padding: 15px 20px;

      .__content_box__ {
        color: @white;
      }
    }
  }
}

/***************确认框***************/

.jBox-confirm {
  &.jBox-shadow {
    .jBox-layout {
      box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
    }
  }

  .jBox-layout {
    background: @white;
    border-radius: 5px;
    color: @font;
    font-size: @h5-fs-base;
    overflow: hidden;

    .__colse__ {
      position: absolute;
      top: 0;
      right: 0;
      z-index: 999;
      width: 40px;
      height: 40px;

      button,
      a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background: transparent;
        border: 0 none;
        color: @close;
        font-size: @h5-fs-base + @h5-fs-base;
        font-family: @fontFamily;
      }
    }

    /****标题****/
    .__title__ {
      display: block;
      margin-top: 10px;
      padding: 0 20px;
      font-size: @h5-fs-t;
      height: 34px;
      line-height: 34px;

      &.__min__ {
        margin-top: 0;
        height: 20px;

        &~.__content__ {
          padding-top: 0;
        }
      }

      &.__center__ {
        font-size: @h5-fs-t + 2;
        text-align: center;
        margin-top: 20px;
      }

      &.__move__ {
        margin-top: 0;
        padding-top: 20px;
        cursor: move;
        height: auto;
      }
    }

    /****内容****/
    .__content__ {
      padding: 15px 20px 40px;

      &.__none_title__ {
        .__content_box__ {
          .__content_text__ {
            font-size: @h5-fs-t;
          }
        }
      }

      /***文本确认框***/
      &.__prompt__ {
        .__content_text__ {
          margin-bottom: 8px;
        }

        .__prompt_label__ {
          display: block;
          width: 100%;

          input {
            border: 1px solid @bd;
            border-radius: 3px;
            display: flex;
            height: 38px;
            width: 100%;
            align-items: center;
            padding: 0 10px;
            font-size: @h5-fs-m - 1;

            &.err {
              border: 1px solid @err;
            }
          }

          span {
            display: block;
            margin-top: 8px;
            font-size: @h5-fs-base;
            color: @err;
          }
        }
      }
    }

    /****按钮****/
    .__button__ {
      display: block;

      &.__hor__ {
        height: @btn-h5-h;

        [class*="__button_row__"] {
          flex-direction: row;
          align-items: center;
          height: 100%;

          a {
            height: 100%;
          }
        }
      }

      [class*="__button_row__"] {
        display: flex;

        a {
          display: flex;
          justify-content: center;
          align-items: center;
          text-align: center;
          font-size: @h5-fs-t - 1;
          color: @font;

          &.cancel {
            color: @cancel;
          }

          &.confirm {
            color: @confirm;
          }
        }
      }
    }
  }

  /**andriod**/
  &.__andriod__ {
    .jBox-layout {
      .__title__ {
        margin-top: 15px
      }

      .__content__ {
        padding-bottom: 30px;
      }

      .__button__ {
        border-top: 0 none;
        margin-bottom: 10px;

        [class*="__button_row__"] {
          justify-content: flex-end;
          padding: 0 18px;

          a {
            border-right: 0 none;
            border-bottom: 0 none;
            min-width: 60px;
            width: auto;
          }
        }
      }
    }
  }

  /**ios**/
  &.__ios__ {
    .jBox-layout {
      .__content__ {

        &.__prompt__ {
          .__content_box__ {
            &.__left__ {
              padding: 0;
            }
          }
        }

        .__content_box__ {

          /***居左***/
          &.__left__ {
            padding: 0 15px;

            .__content_text__ {
              text-align: left;
            }
          }
        }
      }

      .__button__ {
        border-top: 1px solid @bd;

        &.__hor__ {
          [class*="__button_row__"] {
            justify-content: space-between;

            a {
              border-right: 1px solid @bd;

              &:last-child {
                border-right: 0 none;
              }
            }
          }
        }

        &.__ver__ {
          [class*="__button_row__"] {
            width: 100%;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;

            a {
              height: 44px;
              width: 100%;
              border-bottom: 1px solid @bd;

              &:last-child {
                border-bottom: 0 none;
              }
            }
          }
        }
      }
    }
  }
}

/*******************************************************************************************************/

/**动画列表
/*******************************************************************************************************/

.animate {
  -webkit-animation-duration: 0.2s;
  animation-duration: 0.2s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  -webkit-animation-delay: 0s;
  animation-delay: 0s;
  -webkit-animation-timing-function: ease;
  animation-timing-function: ease;
}

@-webkit-keyframes fadeInDown {
  from {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

.fadeInDown {
  -webkit-animation-name: fadeInDown;
  animation-name: fadeInDown;
}

@-webkit-keyframes fadeOutUp {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
}

.fadeOutUp {
  -webkit-animation-name: fadeOutUp;
  animation-name: fadeOutUp;
}

@-webkit-keyframes jBox-scale {
  0% {
    -webkit-transform: scale(1.1);
    opacity: 0;
  }

  100% {
    -webkit-transform: scale(1);
    opacity: 1;
  }
}

@keyframes jBox-scale {
  0% {
    transform: scale(1.1);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.jBox-scale {
  -webkit-animation-name: jBox-scale;
  animation-name: jBox-scale;
}

@-webkit-keyframes jBox-fadeIn {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.8);
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
  }
}

@keyframes jBox-fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.jBox-fadeIn {
  -webkit-animation-name: jBox-fadeIn;
  animation-name: jBox-fadeIn;
}

@-webkit-keyframes jBox-shake {

  0%,
  100% {
    -webkit-transform: translateX(0);
    transform: translateX(0)
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    -webkit-transform: translateX(-5px);
    transform: translateX(-5px)
  }

  20%,
  40%,
  60%,
  80% {
    -webkit-transform: translateX(5px);
    transform: translateX(5px)
  }
}

@keyframes jBox-shake {

  0%,
  100% {
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0)
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    -webkit-transform: translateX(-5px);
    -ms-transform: translateX(-5px);
    transform: translateX(-5px)
  }

  20%,
  40%,
  60%,
  80% {
    -webkit-transform: translateX(5);
    -ms-transform: translateX(5px);
    transform: translateX(5px)
  }
}